from celery_tasks.main import celery_app
# 要把celery_tasks的父目录设置为源
from celery_tasks.yuntongxun.ccp_sms import CCP

# 定义异步任务函数
@celery_app.task(name='ccp_send_sms_code') #　给该任务起个名字
def ccp_send_sms_code(mobile, sms_code):
    # 该函数用于发送短信
    ccp = CCP()
    result = ccp.send_template_sms(mobile,[sms_code, 5], 1)
    return result
